<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8" />
        <title>1.基本列表</title>
        <!-- 引入Vue -->
        <script type="text/javascript" src="../../js/vue.js"></script>
    </head>
    <body>
        <!-- 准备好一个容器-->
        <div id="demo">
            <h1>人员列表</h1>
            <ul>
                <!-- <li v-for="(p,index) in persons" :key="index"> -->
                <li v-for="p xxx persons" :key="p.id">
                    姓名：{{p.name}}，年龄：{{p.age}}，{{index}}
                </li>
            </ul>
        </div>

        <script type="text/javascript">
            //阻止 vue 在启动时生成生产提示。
            Vue.config.productionTip = false 
            new Vue({
                el:'#demo',
                data:{
                    persons:[
                        {id:'yw87ey87ats',name:'圆圆的海峰',age:90},
                        {id:'98ua9sdiu22',name:'大长腿欣宇',age:18},
                        {id:'uiy87s76e8q',name:'上海的芮栋',age:56}
                    ]
                }
            })
        </script>
    </body>
</html>